package com.miracle.java2110.mapper;

import com.miracle.java2110.pojo.RoomManager;
import com.miracle.java2110.vo.BarBo;
import com.miracle.java2110.vo.BarVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface RoomManagerMapper {

    int updateByIdSelective(RoomManager roomManager);

    int addSelective(RoomManager roomManager);

    List<RoomManager> selectAll(Map<String,Object> map);

    int deleteById(Integer id);

    int multiDelete(List<RoomManager> list);

    @Select("select roomType as roomType, count(1) as num from roommanager group by roomType")
    List<BarBo> selectHistogram();

    @Select("select floor as name, count(1) as value from roommanager group by floor")
    List<BarVo> selectPie();
}
